//var request = require('request');
//var cryptoJs = require('crypto-js');
//var uuid = require('node-uuid');
//var moment = require('moment');
var ALY = require('aliyun-sdk');

// cdn配置
var CDNConfig = require('../../CDNConfig.js');

var cdn = new ALY.CDN(CDNConfig);

module.exports = {
	getData: function(url, callback) {
		cdn.describeCdnService({
		}, function(err, res) {
			if (err) {
				callback(null, {
					"message": err['message'],
					"code": err['code'],
					"time": err['time'],
					"statusCode": err['statusCode'],
					"retryable": err['retryable']
				});
				
				return false;
			}
			
			callback(null, res);
		});
	}
}
